$(function() {
	_addChangeListener("#foodAllowance_select", function() {
		var option = $('#foodAllowance_select option:selected');
		if(view && view.data) {view.data.allowanceName = option.text();}
	});
});

function load_foodAllowance_select() {
	if($('#foodAllowance_select').length==0) {return;}

	$('#foodAllowance_select').html('<option value="" selected></option>');

	findAll_basic(path+'/foodAllowance/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#foodAllowance_select').append('<option value="' + response.data[i].foodAllowanceId
				+ '">' + response.data[i].allowanceName + '</option>');
		}
	});
}

function load_foodAllowance_cond_select() {
	if($('#foodAllowance_cond_select').length==0) {return;}

	$('#foodAllowance_cond_select').html('<option value="" selected></option>');

	findAll_basic(path+'/foodAllowance/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#foodAllowance_cond_select').append('<option value="' + response.data[i].foodAllowanceId
				+ '">' + response.data[i].allowanceName + '</option>');
		}
	});
}